$(function(){ 

    showCounter();
    
});

function showCounter() {
    if($.cookies.get('cart') !== null) {
        cart = $.cookies.get('cart');
        
        $('span#cart').text(cart.length);
    }
}